package org.example.service.imp;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.common.ResponseEntity;
import org.example.entity.RechargePackages;
import org.example.mapper.RechargePackagesMapper;
import org.example.service.RechargePackagesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RechargePackagesServiceImpl extends ServiceImpl<RechargePackagesMapper, RechargePackages> implements RechargePackagesService {
    @Autowired
    private RechargePackagesMapper rechargePackagesMapper;
    @Override
    public List<RechargePackages> getAllRechargePackages() {
        return rechargePackagesMapper.getAllRechargePackages();
    }

    @Override
    public String updateRechargePackage(RechargePackages rechargePackage) {
        return baseMapper.updateRechargePackage(rechargePackage)>0?"修改成功":"修改失败";
    }

    @Override
    public String addRechargePackage(RechargePackages rechargePackage) {
        return baseMapper.addRechargePackage(rechargePackage)>0?"添加成功":"添加失败";
    }
}
